<template>
  <d2-container>
    <div style="margin-top: 3em">
      <el-form ref="personal" :model="personal" label-width="80px" size="small ">
        <el-row>
          <el-col :span="6">
            <div class="grid-content bg-purple-dark">
              <el-form-item label="用户名">
                <el-input v-model="personal.username" :readonly=true></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </d2-container>
</template>

<script>
import { request } from '@/api/service'
import globalAPI from '@/api/globalAPI'

export default {
  data () {
    return {
      personal: {}
    }
  },
  methods: {
    findUser () {
      request({
        url: `${globalAPI.BASE_URL}/user/v2`,
        method: 'get'
      }).then(res => {
        if (res.statusCode === 2000) {
          this.personal = res.data
        }
      })
    }
  },
  created () {
    this.findUser()
  }
}
</script>
